<?php /* Smarty version Smarty-3.0.8, created on 2015-10-15 10:44:57
         compiled from "/var/www/html/magroup/tpl/join_index.html" */ ?>
<?php /*%%SmartyHeaderCode:1460946620561f13298e6ed2-96137952%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c1467e0a6a06f78551fc3ebaa47259faef943d35' => 
    array (
      0 => '/var/www/html/magroup/tpl/join_index.html',
      1 => 1444876874,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1460946620561f13298e6ed2-96137952',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("tpl/header.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>

<?php if ($_smarty_tpl->getVariable('is_ok')->value){?>
	<p class="notice notice_succeed">恭喜您，申请成功！</p>
<?php }?>

<div class="intro_header">加入学组</div>
<form id="join-form" action="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'join','a'=>'index'),$_smarty_tpl);?>
" method="POST">	
	<p style="border:none;">
		<label for="name">姓名:</label>
		<input type="text" name="name" id="name" required>
		<span class="required">*</span>
	</p>
	<p>
		<label for="phone">电话:</label>
		<input type="text" name="phone" id="phone" required>
		<span class="required">*</span>
	</p>

	<p>
		<label for="email">邮箱:</label>
		<input type="email" name="email" id="email" required>
		<span class="required">*</span>
	</p>
	<p>
		<label for="unit">单位:</label>
		<input type="text" name="unit" id="unit" required>
		<span class="required">*</span>
	</p>
	<p>
		<label for="intro">研究领域:</label>
		<textarea name="intro" id="intro"></textarea>
	</p>

	<p>
		<label for="submit">  </label>
		<input type="submit" name="submit" value="申请加入" class="button" style="margin-left:70px;width:210px;">
	</p>
</form>
<div style="width:420px;float:right;border-left:1px solid #eee;padding:20px;">
	<p>欢迎加入多智能体专业学组！</p>
	<hr />
	<p>1、微信群，群号：MASCHINA</p>
	<p><img src="http://www.chinaamas.com/uploads/image/20150915/20150915090611_79483.gif" width="180px"/></p>
	<p>2、QQ群，群名：MASCHINA</p>
	<p>3、Googlegroup：</p>
	<p>china-mas-research@googlegroups.com</p>
	<p style="font-size:12px;color:#aaa;">只需要向china-mas-research+subscribe@googlegroups.com<br/>发送邮件即可加。</p>
</div>

<div class="clear"></div>
<script type="text/javascript">
	$('input[name=submit]').click(function(){
		var name = $('input[name=name]').val();
		var phone = $('input[name=phone]').val();
		var email = $('input[name=email]').val();
		var unit = $('input[name=unit]').val();
		var err_msg = "";

		var szReg=/^([a-za-z0-9_-])+@([a-za-z0-9_-])+(.[a-za-z0-9_-])+/; 

		if(name == ""){
			err_msg = "姓名不能为空";
		}else if(phone == "" || phone.length != 11){
			err_msg = "电话格式不正确";
		}else if(email == "" || !szReg.test(email)){
			err_msg = "邮箱格式不正确";
		}else if(unit == ""){
			err_msg = "单位不能为空";
		}

		if(err_msg != ""){
			alert(err_msg);
			return false;
		}
	});

</script>
<?php $_template = new Smarty_Internal_Template("tpl/footer.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>